package two.chapter_1.c1_3;

import edu.princeton.cs.algs4.StdOut;


public class Ex1_3_36 {

    public static void main(String[] args) {

        RandomQueue<Card> queue=initBridge();

       for (Card card:queue){
           StdOut.println(card.getColor().getDesc()+card.getVal());
       }
        StdOut.println(queue.size());
    }

    private static RandomQueue<Card> initBridge() {
        RandomQueue<Card> queue=new RandomQueue<>();
        Card sCard_3=new Card("3", Card.Color.S);
        Card sCard_4=new Card("4", Card.Color.S);
        Card sCard_5=new Card("5", Card.Color.S);
        Card sCard_6=new Card("6", Card.Color.S);
        Card sCard_7=new Card("7", Card.Color.S);
        Card sCard_8=new Card("8", Card.Color.S);
        Card sCard_9=new Card("9", Card.Color.S);
        Card sCard_10=new Card("10", Card.Color.S);
        Card sCard_J=new Card("J", Card.Color.S);
        Card sCard_Q=new Card("Q", Card.Color.S);
        Card sCard_K=new Card("K", Card.Color.S);
        Card sCard_A=new Card("A", Card.Color.S);
        Card sCard_2=new Card("2", Card.Color.S);
        queue.enqueue(sCard_3);
        queue.enqueue(sCard_4);
        queue.enqueue(sCard_5);
        queue.enqueue(sCard_6);
        queue.enqueue(sCard_7);
        queue.enqueue(sCard_8);
        queue.enqueue(sCard_9);
        queue.enqueue(sCard_10);
        queue.enqueue(sCard_J);
        queue.enqueue(sCard_Q);
        queue.enqueue(sCard_K);
        queue.enqueue(sCard_A);
        queue.enqueue(sCard_2);


        Card hCard_3=new Card("3", Card.Color.H);
        Card hCard_4=new Card("4", Card.Color.H);
        Card hCard_5=new Card("5", Card.Color.H);
        Card hCard_6=new Card("6", Card.Color.H);
        Card hCard_7=new Card("7", Card.Color.H);
        Card hCard_8=new Card("8", Card.Color.H);
        Card hCard_9=new Card("9", Card.Color.H);
        Card hCard_10=new Card("10", Card.Color.H);
        Card hCard_J=new Card("J", Card.Color.H);
        Card hCard_Q=new Card("Q", Card.Color.H);
        Card hCard_K=new Card("K", Card.Color.H);
        Card hCard_A=new Card("A", Card.Color.H);
        Card hCard_2=new Card("2", Card.Color.H);
        queue.enqueue(hCard_3);
        queue.enqueue(hCard_4);
        queue.enqueue(hCard_5);
        queue.enqueue(hCard_6);
        queue.enqueue(hCard_7);
        queue.enqueue(hCard_8);
        queue.enqueue(hCard_9);
        queue.enqueue(hCard_10);
        queue.enqueue(hCard_J);
        queue.enqueue(hCard_Q);
        queue.enqueue(hCard_K);
        queue.enqueue(hCard_A);
        queue.enqueue(hCard_2);

        Card dCard_3=new Card("3", Card.Color.D);
        Card dCard_4=new Card("4", Card.Color.D);
        Card dCard_5=new Card("5", Card.Color.D);
        Card dCard_6=new Card("6", Card.Color.D);
        Card dCard_7=new Card("7", Card.Color.D);
        Card dCard_8=new Card("8", Card.Color.D);
        Card dCard_9=new Card("9", Card.Color.D);
        Card dCard_10=new Card("10", Card.Color.D);
        Card dCard_J=new Card("J", Card.Color.D);
        Card dCard_Q=new Card("Q", Card.Color.D);
        Card dCard_K=new Card("K", Card.Color.D);
        Card dCard_A=new Card("A", Card.Color.D);
        Card dCard_2=new Card("2", Card.Color.D);
        queue.enqueue(dCard_3);
        queue.enqueue(dCard_4);
        queue.enqueue(dCard_5);
        queue.enqueue(dCard_6);
        queue.enqueue(dCard_7);
        queue.enqueue(dCard_8);
        queue.enqueue(dCard_9);
        queue.enqueue(dCard_10);
        queue.enqueue(dCard_J);
        queue.enqueue(dCard_Q);
        queue.enqueue(dCard_K);
        queue.enqueue(dCard_A);
        queue.enqueue(dCard_2);


        Card cCard_3=new Card("3", Card.Color.C);
        Card cCard_4=new Card("4", Card.Color.C);
        Card cCard_5=new Card("5", Card.Color.C);
        Card cCard_6=new Card("6", Card.Color.C);
        Card cCard_7=new Card("7", Card.Color.C);
        Card cCard_8=new Card("8", Card.Color.C);
        Card cCard_9=new Card("9", Card.Color.C);
        Card cCard_10=new Card("10", Card.Color.C);
        Card cCard_J=new Card("J", Card.Color.C);
        Card cCard_Q=new Card("Q", Card.Color.C);
        Card cCard_K=new Card("K", Card.Color.C);
        Card cCard_A=new Card("A", Card.Color.C);
        Card cCard_2=new Card("2", Card.Color.C);
        queue.enqueue(cCard_3);
        queue.enqueue(cCard_4);
        queue.enqueue(cCard_5);
        queue.enqueue(cCard_6);
        queue.enqueue(cCard_7);
        queue.enqueue(cCard_8);
        queue.enqueue(cCard_9);
        queue.enqueue(cCard_10);
        queue.enqueue(cCard_J);
        queue.enqueue(cCard_Q);
        queue.enqueue(cCard_K);
        queue.enqueue(cCard_A);
        queue.enqueue(cCard_2);
        return queue;
    }


}
